<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::group(['namespace'=>'App'], function () {

        // 队列商品
        Route::get('wares/wareslist',   'WaresController@waresList');           // 商品列表
        Route::get('wares/waresinfo',   'WaresController@waresinfo');           // 商品详情
        Route::post('wares/addware',    'WaresController@addWare');             // 添加商品
        Route::post('wares/upware',     'WaresController@upWare');              // 编辑商品
        Route::post('wares/onoff',      'WaresController@onOff');               // 商品上下架
        Route::post('wares/delware',    'WaresController@delWare');             // 商品删除
        Route::post('wares/chsort',     'WaresController@chSort');              // 排序

        // 队列管理
        Route::get('queue/queuelist',   'QueueController@queueList');           // 队列列表
        Route::post('queue/upqueue',    'QueueController@upQueue');             // 添加队列
        Route::post('queue/addqueue',   'QueueController@addQueue');            // 编辑队列
        Route::post('queue/onoff',      'WaresController@onOff');               // 队列开关

        // 商户banner图管理
        Route::get('banner/list',       'BannerController@bannerList');           // banner列表
        Route::post('banner/add',       'BannerController@bannerAdd');            //banner添加
        Route::get ('banner/info',       'BannerController@bannerInfo');           // banner详情
        Route::post('banner/update',    'BannerController@bannerUpdate');         // banner信息更新
        Route::post('banner/status',    'BannerController@bannerStatus');         //banner状态改变
        Route::post('banner/delete',    'BannerController@bannerDelete');         //banner删除
        Route::post('banner/position',  'BannerController@bannerOrder');          //banner排序

        // 商户信息管理
        Route::get('shop/detail',          'ShopController@shopDetail');           // 商户详情
        Route::post('shop/passwordUpdate', 'ShopLoginController@shopPasswordUpdate');// 商户登录密码修改

        //商户登录
        Route::post('shop/login',          'ShopLoginController@shopLogin');       //商户登录
        Route::post('shop/out',            'ShopLoginController@shopOut');         //商户退出

        // 商户会员管理
        Route::get('user/list',        'ShopUserController@userList');           // 商户会员列表
        Route::get('user/info',        'ShopUserController@userInfo');           //商户会员详情
        Route::post('user/update',     'ShopUserController@userUpdate');         // 商户会员信息更新
        Route::get('user/balance',     'ShopUserController@userBalance');        // 商户会员余额查看
        Route::post('user/getPay',     'ShopUserController@shopPay');            // 商户会员充值
        Route::post('user/noPay',      'ShopUserController@shopPayNo');           // 商户会员扣款
        Route::get('user/searchUser', 'ShopUserController@searchUser');           // 商户会员未绑定状态下的搜索
        Route::post('user/bindToShop', 'ShopUserController@bindToShop');           // 商户会员协助绑定
        Route::get('user/shopBalanceLog', 'ShopUserController@shopBalanceLog');           // 商户会流水
        Route::get('user/ShopUserLog', 'ShopUserController@ShopUserLog');           // 文斌传user_id,获取用户交易记录

        // 商户队列订单管理
        Route::get('lines/list',        'LinesController@list');                // 订单列表
        Route::get('lines/report',      'LinesController@report');              // 订单汇总
        Route::post('lines/take',       'LinesController@take');                // 提货
        Route::post('lines/tiren',      'LinesController@teren');               // 踢人
        Route::get('lines/dlzt',        'LinesController@dlzt');                // 队列助推
        Route::get('lines/frzt',        'LinesController@frzt');                // 分润助推

        // 商户会员提现管理
        Route::get ('widthdrawUser/list',  'WidthdrawUserController@widthdrawList');// 会员提现列表
        Route::post('widthdrawUser/check', 'WidthdrawUserController@withdrawCheck');// 审核中
        Route::post('widthdrawUser/ok',    'WidthdrawUserController@withdrawOk');   // 审核完成
        Route::post('widthdrawUser/false', 'WidthdrawUserController@withdrawFalse');// 拒绝
        //Route::post('widthdrawUser/aa', 'SystemBalanceController@SystemIncome');// 分润金多余的给平台


        //资金中心
        Route::get('profit/list',   'ProfitController@profitList');// 列表

        Route::get('widthr/list',   'WidthrShopController@widthrlist');// 商户自己的提现明细
        Route::post('widthr/add',   'WidthrShopController@widthrAdd');// 申请提现
        Route::get('shop/capital',   'ShopController@capital');// 申请提现



        // 队列积分兑换
        Route::get('ex/lists',  'ExChangeController@lists');            // 兑换列表
        Route::post('ex/check', 'ExChangeController@check');            // 兑换审核
        Route::get('ex/info',   'ExChangeController@info');             // 兑换详情
        Route::get('ex/serv',   'ExChangeController@serviceCharge');    // 服务费列表
        Route::post('ex/refuse','ExChangeController@refuse');           // 拒绝兑换

        // 商户溢出收益
        Route::get('flow/lists',  'FlowInController@lists');    // 列表
        Route::post('flow/sss', 'FlowInController@sss');        // 预留
        
        // 订单展示
        Route::get('order/show', 'OrderController@show');//订单展示
        Route::post('order/edit', 'OrderController@edit');//提货

        //获取web直传key
        Route::get('oss/key', 'OssController@getkey');//获取临时key

        // 积分商品
        Route::get('pgoods/lists',      'PointsGoodsController@lists');                 // 商品列表
        Route::get('pgoods/details',    'PointsGoodsController@details');               // 商品详情
        Route::post('pgoods/adds',      'PointsGoodsController@adds');                  // 商品添加
        Route::post('pgoods/edit',      'PointsGoodsController@edit');                  // 商品编辑
        Route::post('pgoods/onoff',     'PointsGoodsController@onOff');                 // 商品上/下架
        Route::post('pgoods/del',       'PointsGoodsController@del');                   // 商品删除
        Route::post('pgoods/chsort',    'PointsGoodsController@chSort');                // 商品排序

        // 积分订单
        Route::get('porder/lists',      'PointsOrderController@lists');                 // 订单列表
        Route::post('porder/take',      'PointsOrderController@take');                  // 提货
        

});